
package org.example.news_check.ServiceImpl;

import org.example.news_check.Pojo.articles;
import org.example.news_check.Service.ArticlesService;
import org.example.news_check.Mapper.ArticleMapper; // 确保正确导入
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ArticlesServiceImpl implements ArticlesService {
    @Autowired
    private ArticleMapper articleMapper; // 现在可以正确注入

    @Override
    public articles selectArticlesById(Long id) {
        return articleMapper.selectArticlesById(id);
    }

    @Override
    public void updateArticles(articles articles) {
        articleMapper.updateArticles(articles);
    }

    @Override
    public int selectLikeCount(Long articleId) {
        return articleMapper.selectLikeCount(articleId);
    }
}
